/*
 * @Descripttion: 
 * @version: 
 * @Author: 高月飞
 * @Date: 2023-11-18 08:05:15
 * @LastEditors: 高月飞
 * @LastEditTime: 2023-11-19 12:04:38
 */
import { post, get, put, del } from "@/utils/NetworkRequest/index";

//用户登录----密码登录
export const UserLoginPasswordApi = (loginData: IUserModule.ILoginPasswordFrom) => {
    return post<IUserModule.IApiUserData>('/api/login/password', loginData)
}

//用户登录----短信登录
export const UserLoginSmsApi = (loginData: IUserModule.ILoginSmsFrom) => {
    return post<IUserModule.IApiUserData>('/api/login/sms', loginData)
}

/**
 * 添加用户
 * @param {object} userData 添加用户表单项数据
 * @returns Promise<number>
 */
export const userAddApi = (userData: IUserModule.IUserAddForm) => {
    return post<number>(`/api/user/add`, userData)
  }


  // 用户列表数据
export const userListApi = () => {
    return get<IUserModule.IUserList>('/api/user/list')
  }

